package za.ac.lance.stableabstractionsprinciple.obeys.model.impl;

import za.ac.lance.composition.model.Animal;

/**
 * File Name: Cat.java
 * Version:
 * Description:
 * Package: za.ac.lance.composition
 * Author: Lance
 * Date: Feb 22, 2012
 */
public class Cat implements Animal
{

    private int meowFrequency;
    private Mammal mammal;

    public Cat(int meowFrequency, Mammal mammal)
    {
        this.meowFrequency = meowFrequency;
        this.mammal = mammal;
    }

    public int getMeowFrequency()
    {
        return meowFrequency;
    }

    public void setMeowFrequency(int meowFrequency)
    {
        this.meowFrequency = meowFrequency;
    }

    public Mammal getMammal()
    {
        return mammal;
    }

    public void setMammal(Mammal mammal)
    {
        this.mammal = mammal;
    }

    @Override
    public void action()
    {
        for (int i = 0; i < getMeowFrequency(); i++)
        {
            System.out.println("Cat meowing");
        }
    }
}
